import Vue from 'vue'
import VueRouter from 'vue-router'
import main from "@/views/main/main"
import mainrouter from "@/views/main/mainrouter"
Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    name: "main",
    component: main,
    redirect: '/home',
    children: [
      ...mainrouter
    ]
  },
  // 跳转签到详情页
  {
    path: "/sign",
    name: "sign",
    component: () => import("../views/details/sign.vue")
  },
  // 跳转礼劵详情页
  {
    path: "/voucher",
    name: "voucher",
    component: () => import("../views/details/voucher.vue")
  },
  // 跳转砍价详情页
  {
    path: "/Bargaining",
    name: "Bargaining",
    component: () => import("../views/details/Bargaining.vue")
  },
  // 跳转专栏详情页
  {
    path: "/specialcolumn",
    name: "specialcolumn",
    component: () => import("../views/details/specialcolumn.vue")
  },
  // 跳转登录页面
  {
    path: "/login",
    name: "login",
    component: () => import("../views/details/login.vue")
  },
  //跳转砍价列表
  {
    path: "/allcut",
    name: "allcut",
    component: () => import("../views/details/allcut.vue")
  },
]

const router = new VueRouter({
  routes
})

export default router
